<?php
	mysql_connect("127.0.0.1","root","");
	mysql_select_db("weixinchoujiang");
	$type = $_GET["type"];
	if($type == "0"){
		$type = "手机";
	}else if($type == "1"){
		$type = "电影票";
	}else if($type == "2"){
		$type = "充电宝";
	}else if($type == "3"){
		$type = "耳机";
	}else if($type == "4"){
		$type = "签名照";
	}
	$userName = $_GET["name"];
	$phone = $_GET["phone"];
	$sql = "INSERT INTO choujiang (type,name,phoneNumber) VALUES ('$type','$userName','$phone')";
	$res = mysql_query($sql);
	$array1 = null;
	if($res){
		$array1[] = "提交成功";
		echo json_encode($array1);
	}else{
		$array1[] = "提交失败";
		echo json_encode($array1);
	}
	
	
	
	
	
?>